<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <form class="js-ajax-form" action="" method="post">
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">
                    <!--<label>-->
                        <!--<input type="radio" class="js-check-all" data-direction="x" data-checklist="js-check-x">-->
                    <!--</label>-->
                </th>
                <th width="80">ID</th>
                <th>分类名称</th>
                <th>创建时间</th>
            </tr>
            </thead>
            <volist name="list" id="vo">
                <tr>
                    <td>
                        <input type="radio" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="id" value="{$vo.id}" title="ID:{$vo.id}">
                        <input type="hidden" class="series_pid" value="{$vo.pid}">
                    </td>
                    <td>{$vo.id}</td>
                    <td>
                        {$vo.name}
                    </td>
                    <td>
                        {:date('Y-m-d H:i:s',$vo['create_time'])}
                    </td>
                </tr>
                <notempty name="vo.children">
                    <volist name="vo.children" id="voo">
                        <tr>
                            <td>
                                <input type="radio" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="id" value="{$voo.id}" title="ID:{$voo.id}">
                                <input type="hidden" class="series_pid" value="{$voo.pid}">
                                <input type="hidden" class="series_name" value="{$voo.name}">
                            </td>
                            <td>{$voo.id}</td>
                            <td>
                                {$voo.name}
                            </td>
                            <td>
                                {:date('Y-m-d H:i:s',$voo['create_time'])}
                            </td>
                        </tr>
                    </volist>
                </notempty>
            </volist>
        </table>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>

    function reloadPage(win) {
        win.location.reload();
    }

    function confirm() {
        var selectedCategories     = [];
        $('.js-check:checked').each(function () {
            var $this = $(this);
            selectedCategories.push({
                id: $this.val(),
                pid: $this.siblings('.series_pid').val(),
                name: $this.siblings('.series_name').val()
            });
        });

        return {
            selectedCategories: selectedCategories
        };
    }
</script>
</body>
</html>